import request from "./gocliRequest";
import * as components from "./adminComponents";
export * from "./adminComponents";

/**
 * @description "获取验证码"
 */
export function getAuthCode() {
  return request.get<components.GetAuthCodeResp>(
    `/admin/user/v1/auth/getAuthCode`
  );
}

/**
 * @description "用户登录"
 * @param req
 */
export function sysUserLogin(req: components.SysUserLoginReq) {
  return request.post<components.SysUserLoginResp>(
    `/admin/user/v1/auth/login`,
    req
  );
}

/**
 * @description
 */
export function uploadFile() {
  return request.post<components.UploadFileResp>(`/admin/common/v1/uploadFile`);
}

/**
 * @description "创建SysApplications"
 * @param req
 */
export function createSysApplications(
  req: components.CreateSysApplicationsReq
) {
  return request.post<components.CreateSysApplicationsResp>(
    `/admin/sysapplications/v1/sysapplications/create`,
    req
  );
}

/**
 * @description "删除SysApplications"
 * @param req
 */
export function deleteSysApplications(
  req: components.DeleteSysApplicationsReq
) {
  return request.post<components.DeleteSysApplicationsResp>(
    `/admin/sysapplications/v1/sysapplications/delete`,
    req
  );
}

/**
 * @description "查询SysApplications"
 * @param req
 */
export function getSysApplicationsList(
  req: components.GetSysApplicationsListReq
) {
  return request.post<components.GetSysApplicationsListResp>(
    `/admin/sysapplications/v1/sysapplications/list`,
    req
  );
}

/**
 * @description "更新SysApplications"
 * @param req
 */
export function updateSysApplications(
  req: components.UpdateSysApplicationsReq
) {
  return request.post<components.UpdateSysApplicationsResp>(
    `/admin/sysapplications/v1/sysapplications/update`,
    req
  );
}

/**
 * @description "创建SysDict"
 * @param req
 */
export function createSysDict(req: components.CreateSysDictReq) {
  return request.post<components.CreateSysDictResp>(
    `/admin/sysdict/v1/sysdict/create`,
    req
  );
}

/**
 * @description "删除SysDict"
 * @param req
 */
export function deleteSysDict(req: components.DeleteSysDictReq) {
  return request.post<components.DeleteSysDictResp>(
    `/admin/sysdict/v1/sysdict/delete`,
    req
  );
}

/**
 * @description "查询SysDict"
 * @param req
 */
export function getSysDictList(req: components.GetSysDictListReq) {
  return request.post<components.GetSysDictListResp>(
    `/admin/sysdict/v1/sysdict/list`,
    req
  );
}

/**
 * @description "更新SysDict"
 * @param req
 */
export function updateSysDict(req: components.UpdateSysDictReq) {
  return request.post<components.UpdateSysDictResp>(
    `/admin/sysdict/v1/sysdict/update`,
    req
  );
}

/**
 * @description "创建SysDictValues"
 * @param req
 */
export function createSysDictValues(req: components.CreateSysDictValuesReq) {
  return request.post<components.CreateSysDictValuesResp>(
    `/admin/sysdict/v1/sysdictvalues/create`,
    req
  );
}

/**
 * @description "删除SysDictValues"
 * @param req
 */
export function deleteSysDictValues(req: components.DeleteSysDictValuesReq) {
  return request.post<components.DeleteSysDictValuesResp>(
    `/admin/sysdict/v1/sysdictvalues/delete`,
    req
  );
}

/**
 * @description "查询SysDictValues"
 * @param req
 */
export function getSysDictValuesList(req: components.GetSysDictValuesListReq) {
  return request.post<components.GetSysDictValuesListResp>(
    `/admin/sysdict/v1/sysdictvalues/list`,
    req
  );
}

/**
 * @description "更新SysDictValues"
 * @param req
 */
export function updateSysDictValues(req: components.UpdateSysDictValuesReq) {
  return request.post<components.UpdateSysDictValuesResp>(
    `/admin/sysdict/v1/sysdictvalues/update`,
    req
  );
}

/**
 * @description "创建SysMenu"
 * @param req
 */
export function createSysMenu(req: components.CreateSysMenuReq) {
  return request.post<components.CreateSysMenuResp>(
    `/admin/sysmenu/v1/sysmenu/create`,
    req
  );
}

/**
 * @description "删除SysMenu"
 * @param req
 */
export function deleteSysMenu(req: components.DeleteSysMenuReq) {
  return request.post<components.DeleteSysMenuResp>(
    `/admin/sysmenu/v1/sysmenu/delete`,
    req
  );
}

/**
 * @description "查询SysMenu"
 * @param req
 */
export function getSysMenuList(req: components.GetSysMenuListReq) {
  return request.post<components.GetSysMenuListResp>(
    `/admin/sysmenu/v1/sysmenu/list`,
    req
  );
}

/**
 * @description "更新SysMenu"
 * @param req
 */
export function updateSysMenu(req: components.UpdateSysMenuReq) {
  return request.post<components.UpdateSysMenuResp>(
    `/admin/sysmenu/v1/sysmenu/update`,
    req
  );
}

/**
 * @description "查询城市的中心坐标"
 * @param req
 */
export function getCityCenter(req: components.GetCityCenterReq) {
  return request.post<components.GetCityCenterResp>(
    `/admin/sysnationalarea/v1/sysnationalarea/getCityCenter`,
    req
  );
}

/**
 * @description "查询省市区县"
 * @param req
 */
export function getNationalAreaList(req: components.GetNationalAreaListReq) {
  return request.post<components.GetNationalAreaListResp>(
    `/admin/sysnationalarea/v1/sysnationalarea/getNationalAreaList`,
    req
  );
}

/**
 * @description "查询省市区县"
 * @param req
 */
export function getNationalAreaListByareaCode(
  req: components.GetNationalAreaListByareaCodeReq
) {
  return request.post<components.GetNationalAreaListResp>(
    `/admin/sysnationalarea/v1/sysnationalarea/getNationalAreaListByareaCode`,
    req
  );
}

/**
 * @description "创建SysOrg"
 * @param req
 */
export function createSysOrg(req: components.CreateSysOrgReq) {
  return request.post<components.CreateSysOrgResp>(
    `/admin/sysorg/v1/sysorg/create`,
    req
  );
}

/**
 * @description "删除SysOrg"
 * @param req
 */
export function deleteSysOrg(req: components.DeleteSysOrgReq) {
  return request.post<components.DeleteSysOrgResp>(
    `/admin/sysorg/v1/sysorg/delete`,
    req
  );
}

/**
 * @description "查询SysOrg"
 * @param req
 */
export function getSysOrgList(req: components.GetSysOrgListReq) {
  return request.post<components.GetSysOrgListResp>(
    `/admin/sysorg/v1/sysorg/list`,
    req
  );
}

/**
 * @description "更新SysOrg"
 * @param req
 */
export function updateSysOrg(req: components.UpdateSysOrgReq) {
  return request.post<components.UpdateSysOrgResp>(
    `/admin/sysorg/v1/sysorg/update`,
    req
  );
}

/**
 * @description "创建SysRole"
 * @param req
 */
export function createSysRole(req: components.CreateSysRoleReq) {
  return request.post<components.CreateSysRoleResp>(
    `/admin/sysrole/v1/sysrole/create`,
    req
  );
}

/**
 * @description "删除SysRole"
 * @param req
 */
export function deleteSysRole(req: components.DeleteSysRoleReq) {
  return request.post<components.DeleteSysRoleResp>(
    `/admin/sysrole/v1/sysrole/delete`,
    req
  );
}

/**
 * @description "查询SysRole"
 * @param req
 */
export function getSysRoleList(req: components.GetSysRoleListReq) {
  return request.post<components.GetSysRoleListResp>(
    `/admin/sysrole/v1/sysrole/list`,
    req
  );
}

/**
 * @description "更新SysRole"
 * @param req
 */
export function updateSysRole(req: components.UpdateSysRoleReq) {
  return request.post<components.UpdateSysRoleResp>(
    `/admin/sysrole/v1/sysrole/update`,
    req
  );
}

/**
 * @description "创建SysRoleUnionMenu"
 * @param req
 */
export function createSysRoleUnionMenu(
  req: components.CreateSysRoleUnionMenuReq
) {
  return request.post<components.CreateSysRoleUnionMenuResp>(
    `/admin/sysroleunionmenu/v1/sysroleunionmenu/create`,
    req
  );
}

/**
 * @description "删除SysRoleUnionMenu"
 * @param req
 */
export function deleteSysRoleUnionMenu(
  req: components.DeleteSysRoleUnionMenuReq
) {
  return request.post<components.DeleteSysRoleUnionMenuResp>(
    `/admin/sysroleunionmenu/v1/sysroleunionmenu/delete`,
    req
  );
}

/**
 * @description "查询SysRoleUnionMenu"
 * @param req
 */
export function getSysRoleUnionMenuList(
  req: components.GetSysRoleUnionMenuListReq
) {
  return request.post<components.GetSysRoleUnionMenuListResp>(
    `/admin/sysroleunionmenu/v1/sysroleunionmenu/list`,
    req
  );
}

/**
 * @description "查询所有关联菜单"
 */
export function getSysRoleUnionMenuForRole() {
  return request.post<components.GetSysRoleUnionMenuForRoleResp>(
    `/admin/sysroleunionmenu/v1/sysroleunionmenu/role`
  );
}

/**
 * @description "查询SysSubway"
 * @param req
 */
export function getSysSubwayList(req: components.GetSysSubwayListReq) {
  return request.post<components.GetSysSubwayListResp>(
    `/admin/syssubway/v1/syssubway/list`,
    req
  );
}

/**
 * @description "修改密码"
 * @param req
 */
export function updateUserPassword(req: components.UpdateUserPasswordReq) {
  return request.post<components.UpdateUserPasswordResp>(
    `/admin/sysuser/v1/sysuser/UpdateUserPassword`,
    req
  );
}

/**
 * @description "创建SysUser"
 * @param req
 */
export function createSysUser(req: components.CreateSysUserReq) {
  return request.post<components.CreateSysUserResp>(
    `/admin/sysuser/v1/sysuser/create`,
    req
  );
}

/**
 * @description "删除SysUser"
 * @param req
 */
export function deleteSysUser(req: components.DeleteSysUserReq) {
  return request.post<components.DeleteSysUserResp>(
    `/admin/sysuser/v1/sysuser/delete`,
    req
  );
}

/**
 * @description "获取用户信息"
 */
export function getSysUserInfo() {
  return request.get<components.SysUserItem>(`/admin/sysuser/v1/sysuser/info`);
}

/**
 * @description "查询SysUser"
 * @param req
 */
export function getSysUserList(req: components.GetSysUserListReq) {
  return request.post<components.GetSysUserListResp>(
    `/admin/sysuser/v1/sysuser/list`,
    req
  );
}

/**
 * @description "更新SysUser"
 * @param req
 */
export function updateSysUser(req: components.UpdateSysUserReq) {
  return request.post<components.UpdateSysUserResp>(
    `/admin/sysuser/v1/sysuser/update`,
    req
  );
}
